<template>
    <div class="my">
        <top></top>
        <div class="myInfo">
            <div class="leftBox">
                <div class="user">
                    <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fa4f5df9c-74df-4a6c-ac3b-5534a7626188%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1711271535&t=1e177b1665857443acee0c14426505d7"
                        alt="" srcset="">

                    <div class="btns">
                        <div class="li">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                                class="tabler-icon tabler-icon-share-3">
                                <path
                                    d="M13 4v4c-6.575 1.028 -9.02 6.788 -10 12c-.037 .206 5.384 -5.962 10 -6v4l8 -7l-8 -7z">
                                </path>
                            </svg>
                        </div>
                        <div class="li">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
                                stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                                class="tabler-icon tabler-icon-dots-vertical">
                                <path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                                <path d="M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                                <path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                            </svg>
                        </div>
                    </div>
                </div>
                <div class="name">
                    a253251273
                </div>
                <div class="addtime">
                    {{ $t('my.my1') }}：2023年6月4日
                </div>

                <div class="icons">
                    <img src="../../assets/shiping.png" alt="" srcset="">
                    <img src="../../assets/diqiu.png" alt="" srcset="">
                </div>

                <div class="links">
                    <div class="btn">
                        <img src="../../assets/xinhao.png" alt="" srcset="">
                        <span>{{ $t('my.my2') }}</span>

                    </div>
                </div>

                <div class="gengsui">
                    <div class="label">
                        <img src="../../assets/user.png" alt="" srcset="">
                        <span>3.1K</span>
                    </div>
                    <div class="desc">
                        {{ $t('my.my3') }}
                    </div>
                </div>
            </div>
            <div class="rightBox">
                <div class="banner">
                    <img src="../../assets/banner.png" alt="" srcset="">
                    <div class="more">
                        <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24" fill="none"
                            stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
                            class="tabler-icon tabler-icon-dots-vertical"
                            filter="drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))">
                            <path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                            <path d="M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                            <path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                        </svg>
                    </div>
                </div>

                <div class="paixu">
                    <div class="box" @click="showSelect = !showSelect">
                        <img src="../../assets/paixu.png" alt="" srcset="">
                        <span>{{ tablist[tabIndex] }}</span>
                        <svg data-v-576b9cf5="" xmlns="http://www.w3.org/2000/svg" width="16" height="16"
                            viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
                            stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down">
                            <path data-v-576b9cf5="" d="M6 9l6 6l6 -6"></path>
                        </svg>

                        <div class="morelist" v-show="showSelect">
                            <div class="li" :class="index == tabIndex ? 'active' : ''" v-for="(item, index) in tablist"
                                :key="index">{{ item
                                }}
                            </div>
                        </div>
                    </div>
                </div>


                <div class="create">
                    <div class="videos">
                        <div class="li" @click="toInfo" v-for="(item, index) in videos" :key="index">

                            <video :id="'video' + index" :loop="true" :src="item" :autoplay="autoplay"></video>
                            <div class="more">
                                <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24"
                                    fill="none" stroke="#fff" stroke-width="2" stroke-linecap="round"
                                    stroke-linejoin="round" class="tabler-icon tabler-icon-dots-vertical"
                                    filter="drop-shadow(1px 1px 2px rgb(0 0 0 / 50%)) drop-shadow(0px 5px 15px rgb(0 0 0 / 60%))">
                                    <path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                                    <path d="M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                                    <path d="M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path>
                                </svg>
                            </div>
                            <div class="caozuo">
                                <div class="flex">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"
                                        stroke-linejoin="round" class="tabler-icon tabler-icon-plus">
                                        <path d="M12 5l0 14"></path>
                                        <path d="M5 12l14 0"></path>
                                    </svg>
                                    <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24"
                                        fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"
                                        stroke-linejoin="round" class="tabler-icon tabler-icon-mood-smile">
                                        <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path>
                                        <path d="M9 10l.01 0"></path>
                                        <path d="M15 10l.01 0"></path>
                                        <path d="M9.5 15a3.5 3.5 0 0 0 5 0"></path>
                                    </svg>
                                </div>

                                <div class="flex">
                                    👍
                                    22
                                </div>
                                <div class="flex">
                                    ❤️
                                    28
                                </div>
                                <div class="flex">
                                    😂
                                    3
                                </div>
                                <div class="flex huizhang">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"
                                        fill="none" stroke="yellow.7" stroke-width="2" stroke-linecap="round"
                                        stroke-linejoin="round" class="tabler-icon tabler-icon-bolt"
                                        style="fill: rgb(245, 159, 0);">
                                        <path d="M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"></path>
                                    </svg>
                                    40
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import top from '@/components/top'

export default {
    name: 'my',
    components: {
        top,
    },
    data() {
        return {
            autoplay: true,
            showSelect: false,
            tabIndex: 0,
            tablist: [this.$t('my.my4'), this.$t('my.my5')],
            videos: ['https://vod.pipi.cn/fe5b84bcvodcq1251246104/658e4b085285890797861659749/f0.mp4', 'https://vod.pipi.cn/fe5b84bcvodcq1251246104/658e4b085285890797861659749/f0.mp4', 'https://vod.pipi.cn/fe5b84bcvodcq1251246104/658e4b085285890797861659749/f0.mp4', 'https://vod.pipi.cn/fe5b84bcvodcq1251246104/658e4b085285890797861659749/f0.mp4',]

        }
    },
    mounted() {

    },
    methods: {
        toInfo() {
            this.$router.push('/Info')
        }
    }
}
</script>

<style lang="less" scoped>
.videos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .li {
        width: 24%;
        border-radius: 5px;
        overflow: hidden;
        margin-top: 15px;
        position: relative;
        cursor: pointer;
        border: 1px solid #373a40;
        overflow: hidden;

        video {
            width: 100%;
            object-fit: cover;
        }

        .more {
            position: absolute;
            right: 10px;
            top: 10px;
        }

        .caozuo {
            position: absolute;
            left: 10px;
            bottom: 10px;
            box-sizing: border-box;
            display: flex;
            flex-flow: row;
            -webkit-box-align: center;
            align-items: center;
            -webkit-box-pack: start;
            justify-content: flex-start;
            gap: 4px;
            border-radius: 4px;
            background: rgba(37, 38, 43, 0.6);
            backdrop-filter: blur(5px) saturate(160%);
            box-shadow: rgba(0, 0, 0, 0.16) 0px -2px 6px 1px;
            padding: 4px;

            .flex {
                display: flex;
                align-items: center;
                margin-right: 5px;
            }

            .huizhang {
                font-size: 11px;
                height: 20px;
                line-height: 18px;
                text-decoration: none;
                box-sizing: border-box;
                display: inline-flex;
                -webkit-box-align: center;
                align-items: center;
                -webkit-box-pack: center;
                justify-content: center;
                width: auto;
                text-transform: uppercase;
                border-radius: 2px;
                font-weight: 700;
                letter-spacing: 0.25px;
                cursor: inherit;
                text-overflow: ellipsis;
                overflow: hidden;
                background: rgba(240, 140, 0, 0.2);
                color: rgb(245, 159, 0);
                border: 1px solid transparent;
                padding: 10px 3px;
            }
        }

    }
}

.myInfo {
    display: flex;

    .rightBox {
        margin-left: 20px;

        .banner {
            position: relative;

            img {
                width: 100%;
                height: auto;
            }

            .more {
                position: absolute;
                right: 10px;
                top: 10px;
            }
        }

        .paixu {
            display: flex;
            margin-top: 20px;
            justify-content: flex-end;
            padding-right: 30px;

            .box {
                background-color: #343a40;
                display: flex;
                align-items: center;
                padding: 4px 13px;
                border-radius: 20px;
                position: relative;
                cursor: pointer;

                .morelist {
                    position: absolute;
                    width: 100%;
                    background-color: #25262b;
                    top: 45px;
                    left: 2px;
                    border-radius: 5px;
                    border: 1px solid #373a40;
                    box-sizing: border-box;
                    padding: 5px;
                    z-index: 1000000;

                    .li {
                        height: 35px;
                        display: flex;
                        align-items: center;
                        border-radius: 5px;
                        padding-left: 10px;
                        box-sizing: border-box;
                    }

                    .li:hover {
                        background-color: #373a40;
                        color: #fff;
                    }

                    .active {
                        background-color: #1971c2;
                        color: #fff;
                    }

                    .active:hover {
                        background-color: #1971c2 !important;
                        color: #fff;
                    }
                }

                img {
                    width: 20px;
                    height: auto;
                    margin-right: 5px;
                }

                svg {
                    margin-left: 5px;
                }
            }
        }

    }

    .leftBox {
        width: 320px;
        height: calc(100vh - 100px);
        background-color: #25262b;
        box-sizing: border-box;
        padding: 30px 15px;
        min-width: 320px;

        .user {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;

            img {
                border-radius: 10px;
                width: 144px;
                height: 144px;
            }

            .btns {
                display: flex;
                align-items: center;

                .li {
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-color: rgb(52, 58, 64);
                    margin-left: 10px;
                    cursor: pointer;
                }

                .li:hover {
                    background-color: rgb(33, 37, 41);
                }
            }
        }

        .name {
            margin-top: 20px;
            font-size: 17px;
            color: #e55b53;
            margin-bottom: 7px;
        }

        .addtime {
            font-size: 13px;
            color: #c1c2c5;
            letter-spacing: 1.5px;
        }

        .icons {
            display: flex;
            align-items: center;
            margin-top: 10px;

            img {
                width: 20px;
                height: auto;
                margin-right: 10px;
            }
        }

        .links {
            .btn {
                padding: 0px 22px 0px 14.6667px;
                appearance: none;
                text-align: left;
                text-decoration: none;
                box-sizing: border-box;
                height: 42px;
                font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
                -webkit-tap-highlight-color: transparent;
                display: block;
                width: 100%;
                border-radius: 32px;
                position: relative;
                user-select: none;
                cursor: pointer;
                border: 1px solid transparent;
                background-color: rgb(25, 113, 194);
                color: rgb(254, 254, 254);
                font-size: 14px;
                font-weight: 600;
                line-height: 1.5;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-top: 15px;

                img {
                    width: 15px;
                    height: auto;
                    margin-right: 10px;
                }
            }

            .btn:hover {
                background-color: rgb(24, 100, 171);
            }
        }

        .gengsui {
            border-top: 1px solid #373a40;
            border-bottom: 1px solid #373a40;
            margin-top: 20px;
            padding: 30px 0;

            .label {
                display: flex;
                align-items: center;

                span {
                    font-size: 13px;
                }

                img {
                    width: 15px;
                    height: auto;
                    margin-right: 5px;

                }
            }

            .desc {
                margin-top: 4px;
                color: #c1c2c5;
            }
        }

    }
}

@media screen and (max-width:768px) {
    .myInfo {
        display: block;

        .leftBox {
            width: 100%;
            height: auto;
        }

        .rightBox {
            width: 100%;
            margin-left: 0;
            padding: 0 15px;
            box-sizing: border-box;
            .paixu{
                padding-right: 0;
            }
        }
    }

    .videos {
        display: block;
        .li{
            width: 100%;
        }
    }

}</style>
